SetMenuItemIconHandle
NEW WITH THE APPEARANCE MANAGER
Sets a menu item's icon.
pascal OSErr SetMenuItemIconHandle ( MenuHandle inMenu, SInt16 inItem, MenuIconType inIconType, Handle inIconHandle);
inMenu
- The handle to the menu structure of the menu item for which you wish to set an icon.
inItem
- An integer representing the item number of the menu item for which you wish to set an icon.
inIconType
- The type of icon (
'ICON'
,'cicn'
,'SICN'
, or icon suite) you wish to attach, as specified by a menu icon handle constant.inIconHandle
- The handle to the icon you wish to attach to a menu item.
- function result
- A result code; see "Result Codes".
DISCUSSION
TheSetMenuItemIconHandle
function sets the icon of a menu item with an icon handle instead of a resource ID.SetMenuItemIconHandle
allows you to set icons of type'ICON'
,'cicn'
,'SICN'
, as well as icon suites. To set resource-based icons for a menu item, callSetItemIcon
.
- WARNING
- Disposing of the menu will not dispose of the icon handles set by this function. To prevent memory leaks, your application should dispose of the icons when you dispose of the menu.
![]()
SEE ALSO
"Appearance Manager Gestalt Selector Constants".